<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
 
<script>document.write("<link   rel='stylesheet'   type='text/css'   href='css/listcontext"+localStorage.theme+".css'>")</script>
<script src="js/common.js" language="JavaScript" type="text/javascript"></script>
<script language=javascript> 
function formatText(content)
{
 context= content.replace(/(http[s]?:[a-z0-9\/\.]*)/gi, "<a href=\"javascript:openNewTab('$1', false, false);\">$1</a>"); 
 for(var i=0;i<faceValue.split(',').length;i++)
 { 
   context=context.replace( new RegExp("\\"+faceValue.split(',')[i],"g") ,"<img src='faces/"+faceSource.split(',')[i]+"' class=img1>");
 }
 return context;
}
function insertFace(pageNo)
{
  if(pageNo<1||pageNo>2)return;
  var f=(pageNo-1)*10;
  var n=pageNo*10;
  var rs ="<img class=img1 src='img/forward.png' onclick='insertFace("+(pageNo-1)+")'>";
 
  for(var i=f;i<n;i++)
  {
   rs=rs+"<img class=img1 onclick=\"InsertString($('status'),this.title);\" src='faces/"+faceSource.split(',')[i]+"' title='"+faceValue.split(',')[i]+"'>";
  } 
  $('faceTd').innerHTML= rs+"<img class=img1 src='img/next.png' onclick='insertFace("+(pageNo+1)+")'>"; 
} 

function messageView(xhr,url,msg)
{   
    localStorage.status="";
	localStorage.submitOnclick="";
    var rs = xhr.responseText;
    var myObject = JSON.parse(rs);	
	if(myObject.error_code!=null)
	   OpenDiv(280, 160,"<textarea cols=36 rows=8>"+url+"\n"+rs+"</textarea>");
    else
	 OpenDiv(220,100,'<table ><tr><td><img src="img/success.png" height=80></td><td>'+msg+'</td></tr></table>');
	 //OpenDiv(280, 225,msg+"<br><textarea cols=36 rows=10>"+url+"\n"+rs+"</textarea>");
}
function commentSubmit(id)
{ 
    if($('status').value.length<2) {$("msgTd").innerHTML='字数太少！';return;}
	else if($('status').value.length>140) {$("msgTd").innerHTML='字数太多！';return;}
     var url="http://api.t.sina.com.cn/statuses/comment.json?source=3900123176&id="+id+"&comment="+encodeURIComponent(document.all.status.value);
	 var xhr=new XMLHttpRequest(); 
	 xhr.open("POST",url, true); 
	 xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	
	   //同时发微博	
	  if(document.all.twitterChk.checked)
	  {
	          var xhr1 = new XMLHttpRequest(); 
			  var url1 = "http://api.t.sina.com.cn/statuses/repost.json?source=3900123176&id="+id+"&status="+encodeURIComponent(document.all.status.value);
			  xhr1.open("POST",url1, true); 
			  xhr1.onreadystatechange =  function() {
				 if (xhr1.readyState == 4) {	
				 list();messageView(xhr,url,'评论并发微博成功！');				 
				 }};
			  xhr1.send();	 
	  }
	  else {  list();messageView(xhr,url,'评论成功！');}
	 }};
     xhr.send();	
}
function fav(id)
{ 
  var xhr = new XMLHttpRequest(); 
  var url = "http://api.t.sina.com.cn/favorites/create.json?source=3900123176&id="+id;
  xhr.open("POST",url, true); 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	
	messageView(xhr,url,'收藏成功！');
	 }};
  xhr.send();
}
function repostSubmit(id)
{
  if($('status').value.length>140) {$("msgTd").innerHTML='字数太多！';return;}
  var xhr = new XMLHttpRequest(); 
  var url = "http://api.t.sina.com.cn/statuses/repost.json?source=3900123176&id="+id+"&status="+encodeURIComponent(document.all.status.value);
  xhr.open("POST",url, true); 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	
	      //同时评论	
		  if(document.all.commentChk.checked)
		  {
			  var xhr1 = new XMLHttpRequest(); 
			  var url1 = "http://api.t.sina.com.cn/statuses/comment.json?source=3900123176&id="+id+"&comment="+encodeURIComponent(document.all.status.value);
			  xhr1.open("POST",url1, true); 
			  xhr1.onreadystatechange =  function() {
				 if (xhr1.readyState == 4) {	
				 list();messageView(xhr,url,'转发并评论成功！');				 
				 }};
			  xhr1.send();	 
		  }
		  else
		   {list();messageView(xhr,url,'转发成功！');}
	 }};
  xhr.send();
}
function sendStatuses()
{
    if($('status').value.length<2) {$("msgTd").innerHTML='字数太少！';return;}
	else if($('status').value.length>140) {$("msgTd").innerHTML='字数太多！';return;}
	var xhr = new XMLHttpRequest(); 
    var url = "http://api.t.sina.com.cn/statuses/update.json?source=3900123176&status="+encodeURIComponent(document.all.status.value);
    xhr.open("POST",url, true); 
    xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	
	list();messageView(xhr,url,'发布成功！');	
	 }};
  xhr.send();
}
function sendMsg(id)
{
  if($('status').value.length<2) {$("msgTd").innerHTML='字数太少！';return;}
  else if($('status').value.length>300) {$("msgTd").innerHTML='字数太多！';return;}
  var xhr = new XMLHttpRequest(); 
  var url = "http://api.t.sina.com.cn/direct_messages/new.json?id="+id+"&source=3900123176&text="+document.all.status.value;
  xhr.open("POST",url, true); 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	 	  	
	 list();messageView(xhr,url,'私信发送成功！');     
	 }};
  xhr.send();
}
function share()
{
var s = document.all.status;
if(document.all.shareChk.checked)
 chrome.tabs.getSelected(null, function(tab) {
 s.value=s.value+"分享："+tab.title+tab.url; viewNumKey();  
    }); 
else
   s.value=s.value.split("分享：")[0]; viewNumKey();  
s.focus();
}
function repost(id,username)
{
   OpenDiv(350, 150,"  <textarea id=status cols=45 rows=6   onkeydown=\"ctrlEnter('submit');\" autofocus=true></textarea> <table width=100%><tr><td><input type=checkbox name=commentChk>同时给<b>"+username+"</b>评论</td><td align=right class=td1 ><span id=numkey>140</span>&nbsp;&nbsp;&nbsp;</td><td><a id=submit href='javascript:void(0)' title='转发' onclick=\"repostSubmit("+id+")\"><img src='img/zhuan.png' title='转发' class=img1></a></td></tr></table>");insertFace(1);viewNumKey();
}
function send(id)
{
   OpenDiv(350, 200,"<textarea id=status cols=45 rows=8 onkeydown=\"ctrlEnter('submit');\" autofocus=true></textarea> <table width=100%><tr><td><input type=checkbox name=shareChk onclick='share();'>分享浏览器当前网页</td><td><a href='javascript:void(0)'><img src='img/pic.png'  class=img1 title='功能暂未开放' onclick=\"\"></a></td><td align=right class=td1 ><span id=numkey>140</span>&nbsp;&nbsp;&nbsp;</td><td><a id=submit href='javascript:void(0)' title='发布新微博' onclick=\"sendStatuses("+id+")\"><img src='img/twitter.png' title='发布' width=32 height=32> </a></td></tr></form></table>");insertFace(1);viewNumKey();
}
function messages(id,screenname)
{
   OpenDiv(350, 150,"  <textarea id=status cols=45 rows=6  onkeydown=\"ctrlEnter('submit');\" autofocus=true></textarea> <table width=100%><tr><td>发送给：<b>"+screenname+"</b></td><td align=right class=td1 ><span id=numkey no140=true>300</span>&nbsp;&nbsp;&nbsp;</td><td><a id=submit href='javascript:void(0)' title='私信' onclick=\"sendMsg("+id+")\"><img src='img/zhuan.png' title='私信' class=img1></a></td></tr></table>");insertFace(1);viewNumKey();
}
function comment(id,screenname)
{
   screenname=screenname.length>0?"回复@"+screenname+":":"";
   OpenDiv(350, 150,"  <textarea id=status cols=45 rows=6  onkeydown=\"ctrlEnter('submit');\" autofocus=true>"+screenname+ "</textarea> <table width=280><tr><td><input type=checkbox name=twitterChk>同时发条微博</td><td align=right class=td1 ><span id=numkey>"+(140-screenname.length)+"</span>&nbsp;&nbsp;&nbsp;</td><td><a id=submit href='javascript:void(0)'  title='评论' onclick=\"commentSubmit("+id+",'"+screenname+"')\"><img src='img/comment.png' title='评论' class=img1></a></td></tr></table>");insertFace(1);viewNumKey();
}
function confirmDlg(id)
{
OpenDiv(200, 100,"&nbsp;&nbsp;&nbsp;&nbsp;确认删除吗？<br><br><center><a href='javascript:void(0);' onclick=\"$('Loading').style.display='none';destroy("+id+");\"><img src='img/ok.png'  height=20>确定</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:void(0);'  onclick=\"$('Loading').style.display='none'\" ><img src='img/cancel.png'  height=20>取消</a></center>"); 
}
function destroy(id)
{
  var xhr = new XMLHttpRequest(); 
  var url ="";
  if(localStorage.currentListUrlName=='statuses/comments_timeline')
     url ="http://api.t.sina.com.cn/statuses/comment_destroy/"+id+".json?source=3900123176"; 
  if(localStorage.currentListUrlName=='direct_messages')
     url ="http://api.t.sina.com.cn/direct_messages/destroy/"+id+".json?source=3900123176"; 
  if(localStorage.currentListUrlName=='favorites')
     url ="http://api.t.sina.com.cn/favorites/destroy/"+id+".json?source=3900123176"; 
  if(localStorage.currentListUrlName=='statuses/friends')
     url = "http://api.t.sina.com.cn/friendships/destroy/"+id+".json?source=3900123176";
  if(url=="")
     url = "http://api.t.sina.com.cn/statuses/destroy/"+id+".json?source=3900123176"; 
  xhr.open("POST",url, true); 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	 	
	 list(); messageView(xhr,url,'删除成功！');     
	 }};
  xhr.send();
}
function follow(id,screenname)
{
  var xhr = new XMLHttpRequest(); 
  var url = "http://api.t.sina.com.cn/friendships/create/"+id+".json?source=3900123176" ;
  xhr.open("POST",url, true); 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	 	  	
	 list();messageView(xhr,url,'关注成功！');     
	 }};
  xhr.send();
}
function selectRow(obj,flag,spObjName)
{
 var sp = document.getElementsByName(spObjName);
 if(flag==1)
 {
 
 obj.className='textdiv_redline'; 
 for(var i=0;i<sp.length;i++)
 sp[i].style.display='';
 }
 else 
 {
 obj.className='textdiv'; 
 for(var i=0;i<sp.length;i++)
 sp[i].style.display='none';
 }
}

function refreshZP(ids)
{
  var xhr = new XMLHttpRequest(); 
  var url = "http://api.t.sina.com.cn/statuses/counts.json?source=3900123176&ids="+ids 
  xhr.open("GET",url, true); 
 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	 	
	 var respText = xhr.responseText;
	 if(respText!='[]')
	 {
	    var myObject=JSON.parse(respText); 
		for(var i=0;i<myObject.length;i++)
		{
         if(myObject[i] !=null) //api bug
		 {
			 var z = document.getElementsByName("z"+myObject[i].id);
			 var p = document.getElementsByName("p"+myObject[i].id);
			 var a = document.getElementsByName("a"+myObject[i].id);           
			 for(var j=0;j<z.length;j++)
			 {
				z[j].innerText="("+myObject[i].rt+")";
				p[j].innerText="("+myObject[i].comments+")";
			 }	 
			 if(myObject[i].comments==0)
				for(var j=0;j<a.length;j++)a[j].onclick=function(){comment(this.name.split('a')[1],'');};			
			}  
		}
	 } 	  
	 }};
  xhr.send();
}
function nameMouseDown(uid)
{
 if(event.button == 2&&event.srcElement.innerText!='我') messages(uid,event.srcElement.innerText); 
 if(event.button == 0) goUserHome(uid);
}

function goUserHome(uid)
{
 localStorage.pageNo=1;
 localStorage.currentListUrlName='statuses/user_timeline'+'/'+uid;
 self.parent.window.selectedLi(7);
 list();
}
function listComments(id,pageNo,node)
{
 var listDiv=$("d"+id+"_"+node);
 if(listDiv.style.display==''&&pageNo==0) {listDiv.style.display='none';return;}
 else pageNo=(pageNo==0?1:pageNo);
 parent.document.all.processpic.src='img/processbar.gif';
 
  var xhr = new XMLHttpRequest(); 
  var url = "http://api.t.sina.com.cn/statuses/comments.json?source=3900123176&count=5&page="+pageNo+"&id="+id;
  xhr.open("GET",url, true); 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {	 	
	 var respText = xhr.responseText;
	 if(respText!='[]')
	 {
	    var myObject=JSON.parse(respText);
		var ls="";
		for(var i=0;i<myObject.length;i++)
		{
		 ls=ls+"<table width=100%><tr><td><div class=textdiv1><a href='javascript:void;' title='粉丝："+myObject[i].user.followers_count+"\n关注："+myObject[i].user.friends_count+"\n微博："+myObject[i].user.statuses_count+"' onmousedown='nameMouseDown("+myObject[i].user.id+");'>"+myObject[i].user.screen_name+(myObject[i].user.verified?"<font color=#ED6500><b>V</b></font>":"")+"</a>:"+formatText(myObject[i].text)+"("+getTime(myObject[i].created_at)+")<a href='javascript:void(0)' onclick=\"comment("+id+",'"+myObject[i].user.screen_name+"');\"\"><img src='img/comment.png' class=img1 title='回复'></a></div><div style='height:8;'><br></div></td></tr></table>";
		}	
		listDiv.innerHTML=ls+"<div align=right>"+
		(pageNo>1?"<a href='javascript:void(0)' onclick=\"listComments("+id+","+(pageNo-1)+","+node+");\"><img src='img/forward.png' title='上一页' class=img1></a>&nbsp;&nbsp;&nbsp;":"")+
		(pageNo=1?"<a href='javascript:void(0)' onclick=\"listComments("+id+","+(pageNo+1)+","+node+");\"><img src='img/next.png' title='下一页' class=img1></a>&nbsp;&nbsp;&nbsp;":"")+
		"<a href=\"javascript:comment("+id+",'');\"><img src='img/comment.png' title='评论' class=img1></a>"+
		"</div>";
		listDiv.style.display=''; 		
	 }
	 else 	 
	  messageView(xhr,url,'无结果！'); 
	  parent.document.all.processpic.src='img/processbar_stop.png';
	 }};
  xhr.send();
}

function list()
{  
  parent.document.all.processpic.src='img/processbar.gif'; 
  var xhr = new XMLHttpRequest();  
  var url = "http://api.t.sina.com.cn/"+localStorage.currentListUrlName+".json?source=3900123176&page="+localStorage.pageNo;
  if(localStorage.currentListUrlName=='statuses/followers'||localStorage.currentListUrlName=='statuses/friends') url=url+"&cursor="+20* (localStorage.pageNo-1);
  xhr.open("GET",url, true); 
  xhr.onreadystatechange =  function() {
     if (xhr.readyState == 4) {
	     var respText = xhr.responseText;
	       if(respText=='[]') { messageView(xhr,url,"无结果或<a href=\"javascript:openNewTab('http://t.sina.com.cn/"+localStorage.uid+"');\">新浪微博</a>API接口错误！");parent.document.all.processpic.src='img/processbar_stop.png'; return;}
		 var myObject = JSON.parse(respText); 
         var listString ="";		
		 var ids = "";
		 if(localStorage.currentListUrlName=='statuses/comments_timeline')  
		 {  
		     for(var i=0;i<myObject.length;i++)	
			 {
				 ids=ids+(myObject[i].status!=null?myObject[i].status.id+",":"");
				 listString+=
						"<div  onmouseover=\"selectRow(this,1,'sp_"+i+"_"+myObject[i].id+"');\" onmouseout=\"selectRow(this,0,'sp_"+i+"_"+myObject[i].id+"');\" class=textdiv"+(myObject[i].id>localStorage.maxId?"_redline":"")+">"+
						"<table width=100%>"+
						"<tr><td width=50><img src='"+myObject[i].user.profile_image_url+"' width=50 height=50 title='"+myObject[i].user.description+"' class=img2></td><td>"+
							"<table width=100%>"+
							"<tr><td><a href='javascript:void;' title='粉丝："+myObject[i].user.followers_count+"\n关注："+myObject[i].user.friends_count+"\n微博："+myObject[i].user.statuses_count+"' onmousedown='nameMouseDown("+myObject[i].user.id+");'>"+getName(myObject[i].user.name)+"</a>"+(myObject[i].user.verified?"<font color=#ED6500><b>V</b></font>":"")+"：</td>"+
							"<td align=right height=22>" +getTime(myObject[i].created_at)+"&nbsp;<span name=sp_"+i+"_"+myObject[i].id+" style='display:none'>"+(localStorage.uid!=myObject[i].user.id?"<a href='javascript:void(0)'   onclick=\"comment("+myObject[i].status.id+",'"+myObject[i].user.screen_name+"');\"><img src='img/comment.png' title='回复' class=img1></a>&nbsp; ":"")+"<a href=\"javascript:confirmDlg("+myObject[i].id+");\"><img src='img/del.png' title='删除' class=img1></a></span></td></tr>"+
							"<tr><td colspan=2> "+formatText(myObject[i].text)+(myObject[i].thumbnail_pic!=null?"<a href='javascript:void(0)' onclick=\"openPic('"+myObject[i].bmiddle_pic+"')\"><img src='img/pic.png' title='图片' class=img1></a>":"")+"</td></tr>"+
							"</table><td></tr>"+
							"<tr><td colspan=2>"+(myObject[i].status!=null?
							"<div class=textdiv1>"+
						"<table width=100%>"+
						"<tr><td align=left><a href='javascript:void;' title='粉丝："+myObject[i].status.user.followers_count+"\n关注："+myObject[i].status.user.friends_count+"\n微博："+myObject[i].status.user.statuses_count+"' onmousedown='nameMouseDown("+myObject[i].status.user.id+");'>"+getName(myObject[i].status.user.name)+"</a>"+(myObject[i].status.user.verified?"<font color=#ED6500><b>V</b></font>":"")+"：</td><td  align=right height=22>"+"<span name='sp_"+i+"_"+myObject[i].id+"' style='display:none'>"+"<a href=\"javascript:repost("+myObject[i].status.id+",'"+myObject[i].status.user.name+"');\"><img src='img/zhuan.png' title='转发' class=img1></a><span name=z"+myObject[i].status.id+"></span>&nbsp<a href='javascript:void(0)' onclick=\"listComments('"+myObject[i].status.id+"',0,"+i+");\" name=a"+myObject[i].status.id+"><img src='img/comment.png' title='评论' class=img1></a><span name=p"+myObject[i].status.id+"></span>"+"<img  class=img1 src='img/fav"+(myObject[i].status.favorited?"_off":"")+".png' title='收藏' onclick=\"if(this.src.indexOf('off')<0)fav("+myObject[i].status.id+");\">&nbsp;"+"</span></td></tr>"+
						"<tr><td colspan=2> "+formatText(myObject[i].status.text)+(myObject[i].status.thumbnail_pic!=null?" <a href='javascript:void(0)' onclick=\"openPic('"+myObject[i].status.bmiddle_pic+"')\"><img src='img/pic.png' title='图片' class=img1></a> ":"")+"</td></tr>		"+
						"<tr><td colspan=2><div id=d"+myObject[i].status.id+"_"+i+" style=\"display:none\"></td></tr>"+
						"	  </table>"+
						"     </div>":"")+
						"</td></tr>"+					 
						"</table><div width=100%  id=d"+myObject[i].id+" style=\"display:none\"></div>"+
						"</div><div style='height:8;'><br></div>";	  
			}
		 }
		else
         if(localStorage.currentListUrlName.indexOf('direct_messages')>=0)  
		   {
		    if(myObject.length==0){localStorage.pageNo--;messageView(xhr,url,'无结果！');parent.document.all.processpic.src='img/processbar_stop.png'; return;} 
			var menu="<div class=textdiv align=right ><a href='javascript:void(0)'  "+(localStorage.currentListUrlName=='direct_messages'?"class=a_selected":"")+" onclick=\"localStorage.currentListUrlName='direct_messages';localStorage.pageNo=1;list();\"><img src='img/recvbox.png' class=img1> 收件箱 </a>&nbsp;&nbsp;&nbsp;<a href='javascript:void(0)'    "+(localStorage.currentListUrlName=='direct_messages/sent'?"class=a_selected":"")+" onclick=\"localStorage.currentListUrlName='direct_messages/sent';localStorage.pageNo=1;list();\"><img src='img/sendbox.png' class=img1>发件箱</a>&nbsp;</div><div style='height:8;'><br></div>";
 			for(var i=0;i<myObject.length;i++)
			{		
 				     listString+="<div onmouseover=\"selectRow(this,1,'sp_"+myObject[i].id+"');\" onmouseout=\"selectRow(this,0,'sp_"+myObject[i].id+"');\" class=textdiv><table width=100%><tr><td ><img src='"+myObject[i].sender.profile_image_url+"' width=50 height=50 title='"+myObject[i].sender.description+"' class=img2></td><td width=100%><table width=100%><tr><td align=left><a href='javascript:void;'  title='粉丝："+myObject[i].sender.followers_count+"\n关注："+myObject[i].sender.friends_count+"\n微博："+myObject[i].sender.statuses_count+"' 					  onmousedown='nameMouseDown("+myObject[i].sender.id+");'>"+getName(myObject[i].sender.screen_name)+"</a>"+(myObject[i].sender.verified?"<font color=#ED6500><b>V</b></font>":"")+":&nbsp;</td><td align=right height=22>" +getTime(myObject[i].created_at)+"&nbsp;<span name=sp_"+myObject[i].id+" style='display:none'><a href=\"javascript:messages('"+myObject[i].sender.id+"','"+myObject[i].sender.screen_name+"');\"><img src='img/comment.png' title='回复' class=img1></a>&nbsp;<a href=\"javascript:confirmDlg('"+myObject[i].id+"');\"><img src='img/del.png' title='删除' class=img1></a></span></td></tr><tr><td  align=left colspan=2>"+formatText(myObject[i].text)+"</td></tr></table></td></tr></table></div><div style='height:8;'><br></div>";					  
            }	
			listString=menu+listString+menu;
         }
		 else
		    if(localStorage.currentListUrlName=='statuses/followers'||localStorage.currentListUrlName=='statuses/friends') 				  
			{ 
					var menu="<div class=textdiv align=right ><a href='javascript:void(0)'    "+(localStorage.currentListUrlName=='statuses/followers'?"class=a_selected":"")+" onclick=\"localStorage.currentListUrlName='statuses/followers';localStorage.pageNo=1;list();\"><img src='img/fans.png' class=img1>我的粉丝</a>&nbsp;&nbsp;&nbsp;<a href='javascript:void(0)'  "+(localStorage.currentListUrlName=='statuses/friends'?"class=a_selected":"")+" onclick=\"localStorage.currentListUrlName='statuses/friends';localStorage.pageNo=1;list();\"><img src='img/love.png' class=img1>我关注的人 </a>&nbsp;</div><div style='height:8;'><br></div>";
	   		
			 
				   for(var i=0;i<myObject.users.length;i++)
				      listString+="<div onmouseover=\"selectRow(this,1,'sp_"+myObject.users[i].id+"');\" onmouseout=\"selectRow(this,0,'sp_"+myObject.users[i].id+"');\" class=textdiv>"+
					  "<table width=100%>"+
					  "<tr><td width=50><img src='"+myObject.users[i].profile_image_url+"' width=50 height=50 title='"+myObject.users[i].description+"' class=img2></td>"+
					  "<td><table  width=100%><tr><td><a href='javascript:void;'  title='粉丝："+myObject.users[i].followers_count+"\n关注："+myObject.users[i].friends_count+"\n微博："+myObject.users[i].statuses_count+"' onmousedown='nameMouseDown("+myObject.users[i].id+");'>"+myObject.users[i].screen_name+"</a>"+(myObject.users[i].verified?"<font color=#ED6500><b>V</b></font>":"")+"</td>"+
					  "<td align=right height=22><span name=sp_"+myObject.users[i].id+" style='display:none'>"+(localStorage.currentListUrlName=='statuses/friends'?"<a href='javascript:void(0)' onclick='confirmDlg("+myObject.users[i].id+");'><img src='img/del_follow.png' title='移除' class=img1></a> ":"<a href=\"javascript:follow('"+myObject.users[i].id+"','"+myObject.users[i].screen_name+"')\"><img src='img/follow.png' title='关注' class=img1></a>&nbsp;")+"<a href=\"javascript:messages('"+myObject.users[i].id+"','"+myObject.users[i].screen_name+"');\"><img src='img/zhuan.png' title='私信' class=img1></a></span></td></tr>"+
					  "<tr><td><img src='img/"+myObject.users[i].gender+".png"+"' title='"+getTime(myObject.users[i].created_at)+"'>"+myObject.users[i].location+"&nbsp;粉丝 "+myObject.users[i].followers_count+" 人</td><td valign=bottom  align=right>"+"&nbsp;微博 "+myObject.users[i].statuses_count+" 条"+"</td></tr></table></td></tr></table>"+(myObject.users[i].status!=null?"<div class=textdiv1 ><table width=100%><tr><td>"+formatText(myObject.users[i].status.text)+"&nbsp;&nbsp;&nbsp;&nbsp;----"+getTime(myObject.users[i].status.created_at)+"</td></tr></table></div>":"")+"</div><div style='height:8;'><br></div>";
               listString=menu+listString+menu;
			}
		 else
           {
		      if(myObject.length==0){localStorage.pageNo--;messageView(xhr,url,'无结果！');parent.document.all.processpic.src='img/processbar_stop.png'; return;} 
			  for(var i=0;i<myObject.length;i++)
			  {	
			        ids=ids+myObject[i].id+","+(myObject[i].retweeted_status!=null?myObject[i].retweeted_status.id+",":"");
					listString+= 
					"<div  onmouseover=\"selectRow(this,1,'sp_"+i+"_"+myObject[i].id+"');\" onmouseout=\"selectRow(this,0,'sp_"+i+"_"+myObject[i].id+"');\" class=textdiv"+(localStorage.currentListUrlName=='statuses/friends_timeline'&&myObject[i].id>localStorage.maxId?"_redline":"")+">"+
					"<table width=100%>"+
					  "<tr>"+
					      "<td width=50><img src='"+myObject[i].user.profile_image_url+"' width=50 height=50   title='"+myObject[i].user.description+"' class=img2></td>"+
					      "<td>"+
							  "<table width=100%>"+
							  "<tr>"+
							  "<td><a href='javascript:void;' title='粉丝："+myObject[i].user.followers_count+"\n关注："+myObject[i].user.friends_count+"\n微博："+myObject[i].user.statuses_count+"' onmousedown='nameMouseDown("+myObject[i].user.id+");'>"+getName(myObject[i].user.name)+"</a>"+(myObject[i].user.verified?"<font color=#ED6500><b>V</b></font>":"")+"：</td>"+
							  "<td align=right height=22>"+getTime(myObject[i].created_at)+"&nbsp;<span name='sp_"+i+"_"+myObject[i].id+"' style='display:none'><a href=\"javascript:repost("+myObject[i].id+",'"+myObject[i].user.name+"');\"><img src='img/zhuan.png' title='转发' class=img1></a><span name=z"+myObject[i].id+"></span>&nbsp<a href='javascript:void(0)' onclick=\"listComments('"+myObject[i].id+"',0,"+i+");\" name=a"+myObject[i].id+"><img src='img/comment.png' title='评论' class=img1></a><span name=p"+myObject[i].id+"></span>&nbsp;" +(localStorage.currentListUrlName=='favorites'||myObject[i].user.id==localStorage.uid?"<a href=\"javascript:confirmDlg("+myObject[i].id+");\"><img src='img/del.png' title='删除' class=img1></a>&nbsp":"<img class=img1 src='img/fav"+(myObject[i].favorited?"_off":"")+".png' title='收藏' onclick=\"if(this.src.indexOf('off')<0)fav("+myObject[i].id+");\">&nbsp;")+"</span></td>"+
							  "</tr>"+
							  "<tr><td colspan=2> "+formatText(myObject[i].text)+(myObject[i].thumbnail_pic!=null?"<a href='javascript:void(0)' onclick=\"openPic('"+myObject[i].bmiddle_pic+"')\"><img src='img/pic.png' title='图片' class=img1></a>":"")+"</td>"+
							  "</tr>"+
							  "</table>"+
						  "</td></tr>"+
					"<tr><td colspan=2>"+(myObject[i].retweeted_status!=null?
					"<div class=textdiv1>"+
					"<table width=100%>"+
					"<tr><td align=left><a href='javascript:void;'  title='粉丝："+myObject[i].retweeted_status.user.followers_count+"\n关注："+myObject[i].retweeted_status.user.friends_count+"\n微博："+myObject[i].retweeted_status.user.statuses_count+"' onmousedown='nameMouseDown("+myObject[i].retweeted_status.user.id+");'>@"+getName(myObject[i].retweeted_status.user.name)+"</a>"+(myObject[i].retweeted_status.user.verified?"<font color=#ED6500><b>V</b></font>":"")+"：</td><td  align=right height=22>"+"<span name='sp_"+i+"_"+myObject[i].id+"' style='display:none'><a href=\"javascript:repost("+myObject[i].retweeted_status.id+",'"+myObject[i].retweeted_status.user.name+"');\"><img src='img/zhuan.png' title='转发' class=img1></a><span name=z"+myObject[i].retweeted_status.id+"></span>&nbsp<a href='javascript:void(0)' onclick=\"listComments('"+myObject[i].retweeted_status.id+"',0,"+i+");\" name=a"+myObject[i].retweeted_status.id+"><img src='img/comment.png' title='评论' class=img1></a><span name=p"+myObject[i].retweeted_status.id+"></span>"+"<img  class=img1 src='img/fav"+(myObject[i].retweeted_status.favorited?"_off":"")+".png' title='收藏' onclick=\"if(this.src.indexOf('off')<0)fav("+myObject[i].retweeted_status.id+");\">&nbsp;"+"</span></td></tr>"+
					"<tr><td colspan=2> "+formatText(myObject[i].retweeted_status.text)+(myObject[i].retweeted_status.thumbnail_pic!=null?" <a href='javascript:void(0)' onclick=\"openPic('"+myObject[i].retweeted_status.bmiddle_pic+"')\"><img src='img/pic.png' title='图片' class=img1></a> ":"")+"</td></tr>		"+
					"<tr><td colspan=2><div id=d"+myObject[i].retweeted_status.id+"_"+i+" style=\"display:none\"></td></tr>"+
					"	  </table>"+
					"     </div>":"")+
					"   </td></tr>"+ 
					"</table><table  width=100%><tr><td><div id=d"+myObject[i].id+"_"+i+" style=\"display:none\"></div></td></tr></table>"+
					"</div><div style='height:8;'><br></div>";		  
				}
			 }
			document.all.context.innerHTML=listString ;
			 
            //刷新转发和评论数
            refreshZP(ids);
		 
			if(localStorage.currentListUrlName=='statuses/friends_timeline'&&myObject[0].id>localStorage.maxId)
			{
					  localStorage.maxId=myObject[0].id;//更新最大ID
					  localStorage.newFeedCount =0;self.parent.viewMenu();
			}
			//processbar_stop
			parent.document.all.processpic.src='img/processbar_stop.png';
			if( localStorage.pageNo==1&&localStorage.currentListUrlName=='statuses/mentions')
			{
			 xhr.open("GET","http://t.sina.com.cn/atme", true); 
			 xhr.send();
			}
			if( localStorage.pageNo==1&&localStorage.currentListUrlName=='statuses/followers')
			{			 
			 xhr.open("GET","http://t.sina.com.cn/"+localStorage.uid+"/fans", true); 
			 xhr.send();
			}
			if( localStorage.pageNo==1&&localStorage.currentListUrlName=='statuses/comments_timeline')
			{			 
			 xhr.open("GET","http://t.sina.com.cn/comments", true); 
			 xhr.send();
			}	
			if( localStorage.pageNo==1&&localStorage.currentListUrlName=='direct_messages')
			{	 
			 xhr.open("GET","http://t.sina.com.cn/messages", true); 
			 xhr.send();
			}	
        }
    };  
  xhr.send();
}

 
function init()
{
 list();  
 //动态修改字体 
 modifyCssStyle('table','fontSize',localStorage.fontSize);  
 modifyCssStyle('table','fontFamily',localStorage.fontFamily);
 (function(q){!!q?q.toggle():(function(d,j){j=d.createElement('script');j.src='http://ime.qq.com/fcgi-bin/getjs';j.setAttribute('ime-cfg','lt=2');d.getElementsByTagName('head')[0].appendChild(j)})(document)})(window.QQWebIME);
 
 
}
function refresh()
{
 
}
 
 
</script>
 
 <BODY onload='init()'>
 		
<div id=context></div> 
 <div id="Loading" style="display:none" class=textdiv></div>
</body>   
</html>   
